import request from '@/utils/request'

// 查询华为账号列表
export function listAccount(query) {
  return request({
    url: '/resell/account/list',
    method: 'get',
    params: query
  })
}

export function listCustomList(query) {
  return request({
    url: '/resell/account/customlist',
    method: 'get',
    params: query
  })
}

// 查询华为账号详细
export function getAccount(accountId) {
  return request({
    url: '/resell/account/' + accountId,
    method: 'get'
  })
}

export function listAccountToken(query) {
  return request({
    url: '/resell/resellproject/AccountToken',
    method: 'get',
    params: query
  })
}

// 新增华为账号
export function addAccount(data) {
  return request({
    url: '/resell/account',
    method: 'post',
    data: data
  })
}

// 修改华为账号
export function updateAccount(data) {
  return request({
    url: '/resell/account',
    method: 'put',
    data: data
  })
}

// 删除华为账号
export function delAccount(accountId) {
  return request({
    url: '/resell/account/' + accountId,
    method: 'delete'
  })
}
